package com.java;

import java.util.Scanner;

/**
 * 键盘录入
 */
public class KeyboardEntry {
    public static void main(String[] args) {
        // 创建Scanner对象
        Scanner scanner = new Scanner(System.in);
        
        // 录入整数
        int number = scanner.nextInt();
        System.out.println("整数：" + number);
        
        // 录入浮点数
        double decimal = scanner.nextDouble();
        System.out.println("浮点数：" + decimal);
        
        // 接收回车
        String enter = scanner.nextLine();
        System.out.println("回车：" + enter);
        
        // 录入字符串
        String str = scanner.nextLine();
        System.out.println("字符串：" + str);
    }
}
